Support ssh remotes with '#' and '?' in the path to the repository
authorJoey Hess <joeyh@joeyh.name>
Mon, 20 Oct 2025 19:35:24 +0000 (15:35 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 20 Oct 2025 19:35:24 +0000 (15:35 -0400)
commit97b8e4d4c2b5100b2294f867d6eca447d9ca2c42
treede425c3ae6101ea32c8e83d46842381ddd82a2b2
parent0b20ef39f80ccb1aa1f85b5d5b16f48a92f35087
Support ssh remotes with '#' and '?' in the path to the repository

The same way git does.

Affected repository types are regular git ssh remotes, and also gcrypt
remotes, and potentially also bup remotes.

repoPath is used for such repositories accessed over ssh. uriPath is used
in some other places, eg the bittorrent special remote, where it would not
be appropriate to mimic git's behavior. The distinction seems to hold up
well from what I can see.

The ordering of uriFragment after uriQuery is to correctly handle cases
where both appear in an url. "ssh://localhost/tmp/foo?baz#bar" has an
uriFragment of "#bar" and an uriQuery of "?baz". On the other hand,
"ssh://localhost/tmp/foo#baz?bar" has an uriFragment of "#baz?bar" and no
uriQuery.

Sponsored-by: Dartmouth College's DANDI project
CHANGELOG
Git.hs
doc/bugs/fails_to_discover_uuid_over_ssh_with___35___in_path_.mdwn
doc/bugs/fails_to_discover_uuid_over_ssh_with___35___in_path_/comment_1_00c1062abe02a42cea491f6bb8e6e5dc._comment [new file with mode: 0644]